home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Internet / FeedDemon / FeedDemonInstall.exe / {app} / Data / FeedHistory.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2009-09-08  |  4.2 KB  |  108 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6.  
  7. <xsl:output method="html"
  8.     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  9.     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  10.  
  11. <xsl:key name="key-group" match="/feeds/feed" use="@dateGroup" />
  12. <xsl:variable name="feed-count" select="count(/feeds/feed)"/>
  13.  
  14. <xsl:template match="feeds">
  15. <html>
  16. <head>
  17.     <title>$LANG_CONST(S_FeedHistoryRptTitle)$</title>
  18.     $INCLUDE(metatrans.inc)$
  19.     <style type="text/css">
  20.         $INCLUDE(surfer.css)$
  21.         #titlelinks {
  22.             float: right;
  23.             font-size: small;
  24.             font-weight: bold;
  25.             margin-right: 20px;
  26.         }
  27.         #titlelinks a, a.feedtitle { text-decoration: none;    }
  28.         #titlelinks a:hover, a.feedtitle:hover { text-decoration: underline; }
  29.         a.feedtitle { 
  30.             margin-right: 4px;
  31.             color: #1F1F1F;
  32.         }
  33.         ul {
  34.             margin-left: 20px;
  35.             margin-right: 12px;
  36.         }    
  37.         li {
  38.             list-style-type: none;
  39.             margin-bottom: 4px;
  40.         }
  41.         img.icon { margin-right: 3px; }
  42.         li.odd {    background-color: $COLOR-SIDEBAR$; }
  43.     </style>
  44. </head>
  45. <body>
  46.     <div id="pagehead">        
  47.         <div id="newspapertitle">
  48.             <div id="titlelinks">
  49.                 <xsl:choose>
  50.                     <xsl:when test="@isDisabled">
  51.                         <a href="fdaction:?action=enablefeedhistory&value=1">$LANG_CONST(S_NewsLblEnableFeedHistory)$</a>
  52.                     </xsl:when>
  53.                     <xsl:otherwise>
  54.                         <a href="fdaction:?action=enablefeedhistory&value=0">$LANG_CONST(S_NewsLblDisableFeedHistory)$</a>
  55.                     </xsl:otherwise>
  56.                 </xsl:choose>
  57.             </div>
  58.             <img src="$IMAGEDIR$history-lg.gif" align="absmiddle" /> $LANG_CONST(S_FeedHistoryRptPageTitle)$
  59.         </div>
  60.     </div>
  61.  
  62.     <div id="container">
  63.         <xsl:choose>
  64.             <xsl:when test="@isDisabled"><ul><li class="none">$LANG_CONST(S_NewsLblFeedHistoryDisabled)$</li></ul></xsl:when>
  65.             <xsl:when test="$feed-count=0"><ul><li class="none">$LANG_CONST(S_Empty)$</li></ul></xsl:when>    
  66.             <xsl:otherwise>    
  67.                 <!-- note that feeds are output sorted by date added, so no extra per-group sorting is needed -->
  68.                 <xsl:for-each select="feed[count(. | key('key-group', @dateGroup)[1]) = 1]">
  69.                     <xsl:call-template name="groupheader">
  70.                         <xsl:with-param name="group-id" select="@dateGroup"/>
  71.                     </xsl:call-template>
  72.                     <ul class="groupitems" id="{@dateGroup}_group">
  73.                         <xsl:for-each select="key('key-group', @dateGroup)">    
  74.                             <xsl:sort select="@title"/>
  75.                                 <xsl:variable name="li-class">
  76.                                     <xsl:choose>
  77.                                         <xsl:when test="position() mod 2 = 1">odd</xsl:when>
  78.                                         <xsl:otherwise>even</xsl:otherwise>
  79.                                     </xsl:choose>
  80.                                 </xsl:variable>
  81.                                 <!-- each item is identified by its historyId so it can be hidden without reloading the report -->
  82.                                 <li class="{$li-class}" id="{@historyId}">
  83.                                     <a class="icon" href="feed://{@url}" title="$LANG_CONST(S_NewsHintSubscribe)$"><img src="$IMAGEDIR$subscribe.gif" class="icon" align="absmiddle" /></a>
  84.                                     <a class="feedtitle" href="feed://{@url}" title="{@url}"><xsl:value-of select="@title" disable-output-escaping="yes"/></a>                            
  85.                                     <a class="icon" href="fdaction:?action=previewfeed&feedurl={@url}" title="$LANG_CONST(S_NewsHintPreview)$"><img src="$IMAGEDIR$preview.gif" class="icon" align="absmiddle" /></a>
  86.                                     <a class="icon" href="fdaction:?action=deletehistory&historyid={@historyId}" title="$LANG_CONST(S_NewsHintDeleteHistory)$"><img src="$IMAGEDIR$unsubscribe.png" class="icon" align="absmiddle" /></a>
  87.                                 </li>
  88.                         </xsl:for-each>
  89.                     </ul>
  90.                 </xsl:for-each>
  91.             </xsl:otherwise>
  92.         </xsl:choose>
  93.     </div>
  94.     <br />
  95. </body>
  96. </html>
  97. </xsl:template>
  98.  
  99. <xsl:template name="groupheader">
  100.     <xsl:param name="group-id"/>
  101.     
  102.     <div class="groupheader collapsible" id="{$group-id}_header">
  103.         <a href="fdaction:?action=togglecollapse&id={$group-id}"><img src="$IMAGEDIR$arrowdown.gif" id="{$group-id}_img_expand" border="0" align="right" class="button" /></a>
  104.         <span class="groupcaption"><a href="fdaction:?action=togglecollapse&id={$group-id}"><xsl:value-of select="$group-id" disable-output-escaping="yes"/></a></span>
  105.     </div>
  106. </xsl:template>
  107.  
  108. </xsl:stylesheet>